package nju.mscs.gui;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JEditorPane;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JSeparator;
import javax.swing.JTabbedPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;
import nju.mscs.businesslogic.*;

/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class Member extends javax.swing.JFrame {

	{
		//Set Look & Feel
		try {
			javax.swing.UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel");
		} catch(Exception e) {
			e.printStackTrace();
		}
	}

	private JTabbedPane jTabbedPane1;
	private JPanel jPanel1;
	private JLabel jLabel4;
	private JButton jButton2;
	private JButton jButton1;
	private JTextArea jTextArea1;
	private JLabel jLabel8;
	private JTextField jTextField6;
	private JButton jButton8;
	private JButton jButton7;
	private JTextField jTextField18;
	private JTextField jTextField17;
	private JTextField jTextField16;
	private JLabel jLabel24;
	private JLabel jLabel23;
	private JLabel jLabel22;
	private JButton jButton6;
	private JTextField jTextField15;
	private JLabel jLabel21;
	private JButton jButton5;
	private JEditorPane jEditorPane1;
	private JComboBox jComboBox7;
	private JLabel jLabel26;
	private JComboBox jComboBox6;
	private JLabel jLabel19;
	private JComboBox jComboBox5;
	private JLabel jLabel5;
	private JComboBox jComboBox4;
	private JSeparator jSeparator2;
	private JComboBox jComboBox3;
	private JButton jButton4;
	private JTextField jTextField13;
	private JTextField jTextField12;
	private JTextField jTextField11;
	private JTextField jTextField10;
	private JTextField jTextField9;
	private JTextField jTextField4;
	private JLabel jLabel20;
	private JLabel jLabel18;
	private JLabel jLabel17;
	private JLabel jLabel16;
	private JLabel jLabel15;
	private JLabel jLabel14;
	private JLabel jLabel13;
	private JButton jButton3;
	private JTextField jTextField3;
	private JLabel jLabel12;
	private JComboBox jComboBox2;
	private JComboBox jComboBox1;
	private JLabel jLabel11;
	private JTextField jTextField7;
	private JTextField jTextField5;
	private JLabel jLabel10;
	private JLabel jLabel9;
	private JTextField jTextField2;
	private JTextField jTextField1;
	private JLabel jLabel7;
	private JLabel jLabel6;
	private JLabel jLabel3;
	private JLabel jLabel1;
	private JLabel jLabel2;
	private JPanel jPanel3;
	private JPanel jPanel2;

	private AccountManager am = new AM();
	private SearchController sc = new SC();
	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				Member inst = new Member();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public Member() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setLayout(null);
			this.setUndecorated(true);
			{
				jTabbedPane1 = new JTabbedPane();
				getContentPane().add(jTabbedPane1);
				jTabbedPane1.setBounds(27, 27, 1303, 717);
				jTabbedPane1.setFont(new java.awt.Font("微软雅黑",0,28));
				{
					jPanel3 = new JPanel();
					jTabbedPane1.addTab("删除会员", null, jPanel3, null);
					jPanel3.setLayout(null);
					{
						jLabel21 = new JLabel();
						jPanel3.add(jLabel21);
						jLabel21.setText("\u8bf7\u8f93\u5165\u6240\u9700\u8981\u5220\u9664\u7684\u4f1a\u5458\u7684\u7f16\u53f7\u6216\u8054\u7cfb\u65b9\u5f0f\uff1a");
						jLabel21.setBounds(62, 34, 581, 43);
						jLabel21.setFont(new java.awt.Font("微软雅黑",0,28));

					}
					{
						jTextField15 = new JTextField();
						jPanel3.add(jTextField15);
						jTextField15.setBounds(295, 102, 457, 47);
						jTextField15.setFont(new java.awt.Font("微软雅黑",0,28));

					}
					{
						jButton6 = new JButton();
						jPanel3.add(jButton6);
						jButton6.setText("\u663e\u793a\u4fe1\u606f");
						
						jButton6.setBounds(808, 98, 171, 56);
						jButton6.setFont(new java.awt.Font("微软雅黑",0,28));
						jButton6.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								jButton6ActionPerformed(evt);
							}
						});
					}
					{
						jLabel22 = new JLabel();
						jPanel3.add(jLabel22);
						jLabel22.setText("\u4f1a\u5458\u7f16\u53f7");
						
						jLabel22.setBounds(111, 208, 126, 42);
						jLabel22.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel23 = new JLabel();
						jPanel3.add(jLabel23);
						jLabel23.setText("\u4f1a\u5458\u59d3\u540d");
					
						jLabel23.setBounds(111, 310, 134, 45);
						jLabel23.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel24 = new JLabel();
						jPanel3.add(jLabel24);
						jLabel24.setText("\u79ef\u5206\u989d\u5ea6");
						
						jLabel24.setBounds(111, 407, 169, 48);
						jLabel24.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField16 = new JTextField();
						jPanel3.add(jTextField16);
					
						jTextField16.setBounds(247, 195, 767, 65);
						jTextField16.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField17 = new JTextField();
						jPanel3.add(jTextField17);
					
						jTextField17.setBounds(245, 300, 769, 67);
						jTextField17.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField18 = new JTextField();
						jPanel3.add(jTextField18);
						jTextField18.setBounds(245, 403, 769, 69);
						jTextField18.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jButton7 = new JButton();
						jPanel3.add(jButton7);
						jButton7.setText("\u786e\u8ba4\u5220\u9664");
						jButton7.setBounds(222, 523, 192, 68);
						jButton7.setFont(new java.awt.Font("微软雅黑",0,28));
						jButton7.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								jButton7ActionPerformed(evt);
							}
						});
					}
					{
						jButton8 = new JButton();
						jPanel3.add(jButton8);
						jButton8.setText("\u8fd4    \u56de");
						jButton8.setBounds(856, 523, 163, 68);
						jButton8.setFont(new java.awt.Font("微软雅黑",0,28));
						jButton8.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								jButton8ActionPerformed(evt);
							}
						});
					}
					{
						ComboBoxModel jComboBox3Model = 
							new DefaultComboBoxModel(
									new String[] { "编号", "联系方式" });
						jComboBox3 = new JComboBox();
						jPanel3.add(jComboBox3);
						jComboBox3.setModel(jComboBox3Model);
						jComboBox3.setBounds(111, 102, 146, 47);
						jComboBox3.setFont(new java.awt.Font("微软雅黑",0,28));
					}
				}
				{
					jPanel1 = new JPanel();
					jTabbedPane1.addTab("增加会员", null, jPanel1, null);
					jPanel1.setLayout(null);
					jPanel1.setPreferredSize(new java.awt.Dimension(1316, 684));
					jPanel1.setSize(502, 370);
					{
						jLabel2 = new JLabel();
						jPanel1.add(jLabel2);
						jLabel2.setText("\u5ba2\u6237\u7f16\u53f7");
						jLabel2.setBounds(58, 467, 171, 47);
						jLabel2.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel1 = new JLabel();
						jPanel1.add(jLabel1);
						jLabel1.setText("\u5ba2\u6237\u59d3\u540d");
						jLabel1.setBounds(49, 37, 117, 42);
						jLabel1.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel3 = new JLabel();
						jPanel1.add(jLabel3);
						jLabel3.setText("\u8054\u7cfb\u65b9\u5f0f");
						jLabel3.setBounds(49, 171, 117, 42);
						jLabel3.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel4 = new JLabel();
						jPanel1.add(jLabel4);
						jLabel4.setText("\u79ef\u5206\u989d\u5ea6");
						jLabel4.setBounds(49, 221, 117, 40);
						jLabel4.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel6 = new JLabel();
						jPanel1.add(jLabel6);
						jLabel6.setText("\u5ba2\u6237\u6027\u522b");
						jLabel6.setBounds(49, 128, 119, 37);
						jLabel6.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel7 = new JLabel();
						jPanel1.add(jLabel7);
						jLabel7.setText("\u51fa\u751f\u65e5\u671f");
						jLabel7.setBounds(49, 83, 119, 35);
						jLabel7.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField1 = new JTextField();
						jPanel1.add(jTextField1);
						jTextField1.setBounds(198, 467, 517, 44);
						jTextField1.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField2 = new JTextField();
						jPanel1.add(jTextField2);
						jTextField2.setBounds(200, 84, 102, 33);
						jTextField2.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel8 = new JLabel();
						jPanel1.add(jLabel8);
						jLabel8.setText("\u5e74");
						jLabel8.setBounds(312, 83, 41, 34);
						jLabel8.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel9 = new JLabel();
						jPanel1.add(jLabel9);
						jLabel9.setText("\u6708");
						jLabel9.setBounds(429, 83, 49, 34);
						jLabel9.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel10 = new JLabel();
						jPanel1.add(jLabel10);
						jLabel10.setText("\u65e5");
						jLabel10.setBounds(569, 83, 41, 36);
						jLabel10.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField5 = new JTextField();
						jPanel1.add(jTextField5);
						jTextField5.setBounds(200, 37, 278, 36);
						jTextField5.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField6 = new JTextField();
						jPanel1.add(jTextField6);
						jTextField6.setBounds(198, 172, 751, 40);
						jTextField6.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField7 = new JTextField();
						jPanel1.add(jTextField7);
						jTextField7.setBounds(198, 225, 751, 42);
						jTextField7.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel11 = new JLabel();
						jPanel1.add(jLabel11);
						jLabel11.setText("\u5907    \u6ce8");
						jLabel11.setBounds(49, 267, 107, 38);
						jLabel11.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextArea1 = new JTextArea();
						jPanel1.add(jTextArea1);
						jTextArea1.setBounds(198, 277, 830, 136);
						jTextArea1.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jButton1 = new JButton();
						jPanel1.add(jButton1);
						jButton1.setText("\u4fdd\u5b58");
						jButton1.setBounds(265, 543, 160, 62);
						jButton1.setFont(new java.awt.Font("微软雅黑",0,28));
						jButton1.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								jButton1ActionPerformed(evt);
							}
						});
					}
					{
						jButton2 = new JButton();
						jPanel1.add(jButton2);
						jButton2.setText("\u8fd4\u56de");
						jButton2.setBounds(819, 542, 174, 64);
						jButton2.setFont(new java.awt.Font("微软雅黑",0,28));
						jButton2.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								jButton2ActionPerformed(evt);
							}
						});
					}
					{
						ComboBoxModel jComboBox1Model = 
							new DefaultComboBoxModel(
									new String[] { "1", "2","3","4","5","6","7","8","9","10","11","12" });
						jComboBox1 = new JComboBox();
						jPanel1.add(jComboBox1);
						jComboBox1.setModel(jComboBox1Model);
						jComboBox1.setBounds(346, 84, 76, 33);
						jComboBox1.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						ComboBoxModel jComboBox2Model = 
							new DefaultComboBoxModel(
									new String[] { "1","2","3","4","5","6","7","8","9","10","11","12",
											"13","14","15","16","17","18","19","20","21","22","23","24","25",
											"26","27","28","29","30","31"});
						jComboBox2 = new JComboBox();
						jPanel1.add(jComboBox2);
						jComboBox2.setModel(jComboBox2Model);
						jComboBox2.setBounds(468, 85, 91, 32);
						jComboBox2.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jSeparator2 = new JSeparator();
						jPanel1.add(jSeparator2);
						jSeparator2.setBounds(49, 438, 1183, 10);
					}
					{
						ComboBoxModel jComboBox7Model = 
							new DefaultComboBoxModel(
									new String[] { "男", "女" });
						jComboBox7 = new JComboBox();
						jPanel1.add(jComboBox7);
						jComboBox7.setModel(jComboBox7Model);
						jComboBox7.setBounds(198, 127, 116, 39);
						jComboBox7.setFont(new java.awt.Font("微软雅黑",0,28));
					}
				}
				{
					jPanel2 = new JPanel();
					jTabbedPane1.addTab("信息修改", null, jPanel2, null);
					jPanel2.setLayout(null);
					jPanel2.setPreferredSize(new java.awt.Dimension(502, 338));
					{
						jLabel12 = new JLabel();
						jPanel2.add(jLabel12);
						jLabel12.setText("\u5ba2\u6237\u7f16\u53f7/\u8054\u7cfb\u65b9\u5f0f");
						jLabel12.setBounds(35, 51, 253, 36);
						jLabel12.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField3 = new JTextField();
						jPanel2.add(jTextField3);
						jTextField3.setBounds(498, 50, 229, 37);
						jTextField3.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jButton3 = new JButton();
						jPanel2.add(jButton3);
						jButton3.setText("\u67e5\u8be2");
						jButton3.setBounds(758, 43, 114, 44);
						jButton3.setFont(new java.awt.Font("微软雅黑",0,28));
						jButton3.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								jButton3ActionPerformed(evt);
							}
						});
					}
					{
						jLabel13 = new JLabel();
						jPanel2.add(jLabel13);
						jLabel13.setText("\u5ba2\u6237\u7f16\u53f7");
						jLabel13.setBounds(35, 101, 121, 39);
						jLabel13.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel14 = new JLabel();
						jPanel2.add(jLabel14);
						jLabel14.setText("\u5ba2\u6237\u59d3\u540d");
						jLabel14.setBounds(418, 101, 151, 38);
						jLabel14.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel15 = new JLabel();
						jPanel2.add(jLabel15);
						jLabel15.setText("\u6027    \u522b");
						jLabel15.setBounds(39, 198, 111, 40);
						jLabel15.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel16 = new JLabel();
						jPanel2.add(jLabel16);
						jLabel16.setText("\u51fa\u751f\u65e5\u671f");
						jLabel16.setBounds(35, 149, 133, 38);
						jLabel16.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel17 = new JLabel();
						jPanel2.add(jLabel17);
						jLabel17.setText("\u8054\u7cfb\u65b9\u5f0f");
						jLabel17.setBounds(370, 201, 133, 34);
						jLabel17.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel18 = new JLabel();
						jPanel2.add(jLabel18);
						jLabel18.setText("\u79ef\u5206\u989d\u5ea6");
						jLabel18.setBounds(39, 248, 119, 35);
						jLabel18.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel20 = new JLabel();
						jPanel2.add(jLabel20);
						jLabel20.setText("\u5907    \u6ce8");
						jLabel20.setBounds(48, 316, 116, 48);
						jLabel20.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField4 = new JTextField();
						jPanel2.add(jTextField4);
						jTextField4.setBounds(168, 102, 231, 36);
						jTextField4.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField9 = new JTextField();
						jPanel2.add(jTextField9);
						jTextField9.setBounds(539, 102, 172, 38);
						jTextField9.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField10 = new JTextField();
						jPanel2.add(jTextField10);
						jTextField10.setBounds(168, 148, 169, 39);
						jTextField10.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField11 = new JTextField();
						jPanel2.add(jTextField11);
						jTextField11.setBounds(507, 198, 436, 40);
						jTextField11.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField12 = new JTextField();
						jPanel2.add(jTextField12);
						jTextField12.setBounds(168, 197, 169, 41);
						jTextField12.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jTextField13 = new JTextField();
						jPanel2.add(jTextField13);
						jTextField13.setBounds(168, 248, 780, 48);
						jTextField13.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jEditorPane1 = new JEditorPane();
						jPanel2.add(jEditorPane1);
						jEditorPane1.setBounds(168, 321, 953, 196);
						jEditorPane1.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jButton4 = new JButton();
						jPanel2.add(jButton4);
						jButton4.setText("\u4fdd\u5b58\u4fee\u6539");
						jButton4.setBounds(708, 567, 164, 60);
						jButton4.setFont(new java.awt.Font("微软雅黑",0,28));
						jButton4.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								jButton4ActionPerformed(evt);
							}
						});
					}
					{
						jButton5 = new JButton();
						jPanel2.add(jButton5);
						jButton5.setText("\u8fd4\u56de");
						jButton5.setBounds(1009, 568, 167, 58);
						jButton5.setFont(new java.awt.Font("微软雅黑",0,28));
						jButton5.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								jButton5ActionPerformed(evt);
							}
						});
					}
					{
						ComboBoxModel jComboBox4Model = 
							new DefaultComboBoxModel(
									new String[] { "编号", "联系方式" });
						jComboBox4 = new JComboBox();
						jPanel2.add(jComboBox4);
						jComboBox4.setModel(jComboBox4Model);
						jComboBox4.setBounds(296, 48, 175, 43);
						jComboBox4.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel5 = new JLabel();
						jPanel2.add(jLabel5);
						jLabel5.setText("\u5e74");
						jLabel5.setBounds(347, 148, 50, 41);
						jLabel5.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						ComboBoxModel jComboBox5Model = 
							new DefaultComboBoxModel(
									new String[] { "1", "2","3","4","5","6","7","8","9","10","11","12"  });
						jComboBox5 = new JComboBox();
						jPanel2.add(jComboBox5);
						jComboBox5.setModel(jComboBox5Model);
						jComboBox5.setBounds(383, 151, 96, 34);
						jComboBox5.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel19 = new JLabel();
						jPanel2.add(jLabel19);
						jLabel19.setText("\u6708");
						jLabel19.setBounds(483, 151, 56, 35);
						jLabel19.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						ComboBoxModel jComboBox6Model = 
							new DefaultComboBoxModel(
									new String[] { "1","2","3","4","5","6","7","8","9","10","11","12",
											"13","14","15","16","17","18","19","20","21","22","23","24","25",
											"26","27","28","29","30","31" });
						jComboBox6 = new JComboBox();
						jPanel2.add(jComboBox6);
						jComboBox6.setModel(jComboBox6Model);
						jComboBox6.setBounds(512, 150, 111, 37);
						jComboBox6.setFont(new java.awt.Font("微软雅黑",0,28));
					}
					{
						jLabel26 = new JLabel();
						jPanel2.add(jLabel26);
						jLabel26.setText("\u65e5");
						jLabel26.setBounds(627, 152, 42, 33);
						jLabel26.setFont(new java.awt.Font("微软雅黑",0,28));
					}
				}
			}
			pack();
			this.setSize(1369, 782);
			getGraphicsConfiguration().getDevice().setFullScreenWindow(this);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	
	private void jButton1ActionPerformed(ActionEvent evt) {
		//System.out.println("jButton1.actionPerformed, event="+evt);
		String name1 = jTextField5.getText();
		String year1 = jTextField2.getText();
		String sex1 = jComboBox7.getSelectedItem().toString();
		String month1 = jComboBox1.getSelectedItem().toString();
		String day1 = jComboBox2.getSelectedItem().toString();
		String[] birth = new String[]{year1,month1,day1};
		String phone1 = jTextField6.getText();
		String totalpoint1 = jTextField7.getText();
		String notation1 = jTextArea1.getText();
		String ID1 = am.addVipConsumer(name1, birth, sex1, phone1, totalpoint1, notation1);
		if(ID1.equals(null)){
			JOptionPane.showMessageDialog(this,"创建新用户失败！");
			return;
		}
		jTextField1.setText(ID1);
		jTextField5.setText("");
		jTextField2.setText("");
		jTextField6.setText("");
		jTextField7.setText("");
		jTextArea1.setText("");
	}//增加会员 - 保存按钮事件
	
	private void jButton4ActionPerformed(ActionEvent evt) {
		//System.out.println("jButto{n4.actionPerformed, event="+evt);
		String idc = jTextField4.getText();//编号
		String namec = jTextField9.getText();//姓名		
		String yearc = jTextField10.getText(); //年
		String monthc = jComboBox5.getSelectedItem().toString();
		String dayc = jComboBox6.getSelectedItem().toString();
		String sexc = jTextField12.getText(); //性别
		String phonec = jTextField11.getText(); //联系方式
		String pointc = jTextField13.getText();//积分
		String notationc = jEditorPane1.getText();//备注 
		String birthc = yearc+"/"+monthc+"/"+dayc;
		String[] infoc = new String[]{idc,namec,birthc,sexc,phonec,pointc};
		Boolean result2 = am.changeVipConsumer(infoc);
		if(result2==true){
			JOptionPane.showMessageDialog(this,"修改成功！");
			return;
		}
		else{
			JOptionPane.showMessageDialog(this,"修改失败！");
			return;
		}
	}//修改会员-保存修改按钮事件
	
	private void jButton3ActionPerformed(ActionEvent evt) {
		//System.out.println("jButton3.actionPerformed, event="+evt);
		String choice2 = jComboBox4.getSelectedItem().toString();
		String ID2 = null,phone2 = null;
		if(choice2.equals("编号")) ID2 = jTextField3.getText();
		if(choice2.equals("联系方式")) phone2 = jTextField3.getText();
		String[] info2 = sc.searchVIP(ID2, phone2);
		if(info2.equals(null)){
			JOptionPane.showMessageDialog(this,"查无此用户！");
			return;
		}
		jTextField4.setText(info2[0]);//编号
		jTextField9.setText(info2[2]);//姓名
		String[] birth2 = info2[4].split("/");
		jTextField10.setText(birth2[0]); //年
		jComboBox5.setSelectedItem(birth2[1]);
		jComboBox6.setSelectedItem(birth2[2]);
		jTextField12.setText(info2[3]); //性别		
		jTextField11.setText(info2[1]); //联系方式
		jTextField13.setText(info2[5]);//积分
		jEditorPane1.setText(info2[6]);
	}//修改会员-查询按钮
	
	private void jButton6ActionPerformed(ActionEvent evt) {
		//System.out.println("jButton6.actionPerformed, event="+evt);
		String choice3 = jComboBox3.getSelectedItem().toString();
		String ID3 = null,phone3 = null;
		if(choice3.equals("编号")) ID3 = jTextField15.getText();
		if(choice3.equals("联系方式")) phone3 = jTextField15.getText();
		String[] info3 = sc.searchVIP(ID3, phone3);
		if(info3.equals(null)){
			JOptionPane.showMessageDialog(this,"查无此用户！");
			return;
		}
		jTextField16.setText(info3[0]); //编号		
		jTextField17.setText(info3[2]); //姓名
		jTextField18.setText(info3[5]);//积分
	}//显示信息按钮事件
	
	private void jButton7ActionPerformed(ActionEvent evt) {
		//System.out.println("jButton7.actionPerformed, event="+evt);
		if(jTextField16.getText().equals("")||jTextField16.getText().equals(null)){
			JOptionPane.showMessageDialog(this,"会员编号不能为空！");
			return;
		}
		Boolean result3 = am.deleteVipConsumer(jTextField16.getText());
		if(result3){
			JOptionPane.showMessageDialog(this,"删除成功！");
			return;
		}
		else{
			JOptionPane.showMessageDialog(this,"删除失败！");
			return;
		}
	}//确认删除按钮事件
	
	private void jButton2ActionPerformed(ActionEvent evt) {
		//System.out.println("jButton2.actionPerformed, event="+evt);
		Sub_manager.main(null);
		this.dispose();
	}//添加vip-返回
	
	private void jButton5ActionPerformed(ActionEvent evt) {
		//System.out.println("jButton5.actionPerformed, event="+evt);
		Sub_manager.main(null);
		this.dispose();
	}//修改-返回
	
	private void jButton8ActionPerformed(ActionEvent evt) {
		//System.out.println("jButton8.actionPerformed, event="+evt);
		Sub_manager.main(null);
		this.dispose();
	}//删除-返回按钮

}
